<?php include '../public/header.php' ?>
<link rel='stylesheet' href='/static/admin/css/look.css'>
<style>

</style>
<body class="bodychu">
<div>
    <div class="layui-form seaxia seaonechu">
        <div class="titss layui-hide">搜索列表</div>
        <div class="mm">
            <div class="seadiv">
                <select id="seatype" disabled>
                    <option value="engin">项目信息</option>
                </select>
            </div>
        </div>
        <div class="mm">
            <input type="text" id="name" placeholder="请输入项目名称" clearable autocomplete="off" class="layui-input" onkeydown="subtijiao(this.value)">
        </div>
        <div class="mm">
            <button class="laytp-btn laytp-btn-primary" id="seabut" type="button"><i class="layui-icon layui-icon-search"></i> 查询</button>
        </div>
        <div class="seahis layui-hide">
            <div class="tt">
                <span class="aa"><i class="layui-icon layui-icon-time"></i> 历史搜索</span>
                <span class="bb">清空</span>
            </div>
            <div class="kkk">
                <span>卡拉省的</span><span class="guan">x</span>
            </div>
            <div class="kkk">卡拉省的</div>
            <div class="kkk">卡拉省的</div>
            <div class="kkk">卡拉省的</div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="seacon layui-hide">
<!--        <div class="kk">-->
<!--            <div class="hang">-->
<!--                <span class="name">项目名称项目名称项目名称项目名称项目名称</span>-->
<!--                <span class="number">项目编号</span>-->
<!--                <span class="status">审核中</span>-->
<!--            </div>-->
<!--            <div class="hang">-->
<!--                <span class="titzhan">自营</span>-->
<!--                <span class="titzhan">在建</span>-->
<!--                <span class="titzhan">项目类型</span>-->
<!--                <span class="titzhan">建设单位</span>-->
<!--                <span class="titzhan">所在地</span>-->
<!--            </div>-->
<!--            <div class="hang hang_te">-->
<!--                <span>工程造价：45454545.22万元</span>-->
<!--                <span>项目负责人： 张三</span>-->
<!--                <span>实际开工日期：2023-01-25</span>-->
<!--                <span>实际竣工日期：2023-01-25</span>-->
<!--            </div>-->
<!--        </div><div class="xian"></div>-->

    </div>
</div>


<script>
    render_from()
    layui.use(['laytp', 'form'], function() {
        var form = layui.form, layer = layui.layer;

        $("#seabut").click(function () {
            $(".seaxia").removeClass('seaonechu');
            $(".titss").removeClass('layui-hide');
            $(".seacon").removeClass('layui-hide');
            $(".seahis").addClass('seahis2');

            var name = $("#name").val();
            if(!name){
                layer.tips('请输入查询内容','#name', {time: 2000, tips: [1, "#000"],});return false;
            }


            facade.ajax({url: ask_look_sea, data:{name:name}}).done(function(res){
                if (res.code === 2000) {
                    var list = res.data;


                    var str = '';
                    for (var key in list) {
                        str += '<div class="kk" onclick="get_page_engin('+list[key].id+')">';

                        str += '<div class="hang">';
                        str += '<span class="name">'+list[key].name+'</span>';
                        str += '<span class="number">'+list[key].number+'</span>';
                        if(list[key].status == 0){
                            str += '<span class="status fbstatus0">审批中</span>';
                        }
                        if(list[key].status == 1){
                            str += '<span class="status fbstatus1">审批通过</span>';
                        }
                        str += '</div>';

                        str += '<div class="hang">';
                        str += '<span class="titzhan">'+list[key].business_name+'</span>';
                        str += '<span class="titzhan">'+list[key].state_name+'</span>';
                        str += '<span class="titzhan">'+list[key].engintype+'</span>';
                        str += '<span class="titzhan">'+list[key].jian_unit+'</span>';
                        str += '<span class="titzhan">'+list[key].areas+'</span>';
                        str += '</div>';

                        str += '<div class="hang hang_te">';
                        str += '<span>工程造价：'+list[key].expectfee+'万元</span>';
                        str += '<span>项目负责人： '+list[key].man_xiang_name+'</span>';
                        str += '<span>实际开工日期：'+list[key].actualdt+'</span>';
                        str += '<span>实际竣工日期：'+list[key].filishdt+'</span>';
                        str += '</div>';

                        str += '</div>';
                        str += '<div class="xian"></div>';
                    }
                    $(".seacon").html(str);
                }
            });

        });



    });



    function get_page_engin(id) {
        openPage('../engin/show_sea.php?id='+id,'96%','90%');
    }








    function subtijiao() {
        if (event.keyCode == 13) {
            $("#seabut").click();
        }
    }
</script>
</body>
</html>
